<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<sj:head locale="es" jqueryui="true" jquerytheme="cupertino" />
<link rel="stylesheet" type="text/css" href="estilo/style.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Reporte de Fallas...</title>
<script language="JavaScript" type="text/javascript">	
   function maximizar() { 
		self.moveTo(0,0); 
		self.resizeTo(screen.availWidth,screen.availHeight); 
	} 
	  function evaluar_sel_f(id){
		   var vx=document.getElementById(id).checked;
		   var d = new Date();
		   var mes=(d.getMonth() + 1);
		   var dia=d.getDate();
		   if( mes<=9){
			   mes="0"+mes;
		   }
		   if( dia <=9 )
			   dia="0"+dia;
		   var hoy= dia+"/"+(mes)+"/"+d.getFullYear();
		   if (document.getElementById(id).checked==true){
			   form.fechai.value=hoy;
			   form.fechaf.value=hoy;
			   form.fechai.disabled=false;
			   form.fechaf.disabled=false;
			   form.mes.disabled=true;
			   form.anno.disabled=true;
			   form.anno.value=d.getFullYear();
			   form.mes.selectedIndex=mes;
		   }else{
			   form.fechai.value=hoy;
			   form.fechaf.value=hoy;
			   form.fechai.disabled=true;
			   form.fechaf.disabled=true;
			   form.mes.disabled=false;
			   form.anno.disabled=false;
			   form.anno.value=d.getFullYear();
			   form.mes.selectedIndex=mes;
		   }
	   }
 
</script>
</head>
<body onload="maximizar();evaluar_sel_f('opc_fecha'); " >
  <div class='logo_sia'><img src="images/logo.png" /></div>
  <div class="barra_tit_corp" align='center'>Reporte de Fallas...</div>
    <s:url id="car_1" value="listar_fallas.action" /> 
 
    <s:form id="form_"  theme="simple" >
         <table border='0'>
             <tr>
             	<td><input type="checkbox" id='opc_fecha' name="opc_fecha" value="SI" onclick="evaluar_sel_f(this.id);" />Intervalo</td>
             	<td></td>
             	<td></td>
             	<td></td>
             	<td>Area Responsable</td>
             	<td>Radio Base</td>
             	<td>Tipo de Falla</td>
             	<td>Status</td>

             </tr>
             <tr>
                <td>Inicio</td><td><sj:datepicker displayFormat="dd/mm/yy"  showOn="focus"  showAnim="slideDown" duration="fast"  size='6' value="" id="fechai" name="fechai"  /></td><td>Fin</td><td><sj:datepicker displayFormat="dd/mm/yy" showOn="focus"  showAnim="slideDown" duration="fast"  size='6' value="" id="fechaf" name="fechaf"  /></td>
                <td>
                	  <s:url id="car_dep" action="cargar_listas_fallas" /> 
					  <sj:select href="%{car_dep}" 
							name="departamento" 
							id="depart" 
							headerKey="-1" 
							headerValue="TODOS" 
							list="departamentos" 
							listKey='cod' listValue='descripcion'
							indicator="progreso_"
					/>
                </td>
                <td>  
                	  <s:url id="remoteurl" action="cargar_listas_fallas" /> 
					  <sj:select href="%{remoteurl}" 
							name="nodo" 
							id="lx1" 
							headerKey="-1" 
							headerValue="Seleccione" 
							list="nodos" 
							listKey='cod' listValue='descripcion'
							indicator="progreso_"
					/>
				</td>
                <td>
                	<s:url id="tfalla" action="cargar_listas_fallas" /> 
					<sj:select href="%{tfalla}"  
					    name="tipoFalla" 
						id="lx2"   
						headerKey="-1"  
						headerValue="Seleccione" 
						list="tiposFalla" 
						formIds="form_" 
						listKey='cod' listValue='descripcion'
					/> 
                </td>
                <td>
                	<s:url id="remoteurl3" action="cargar_listas_fallas" /> 
					<sj:select href="%{remoteurl3}"  
					    name="statusTicket" 
						id="sfalla"   
						headerKey="-1"  
						headerValue="Seleccione" 
						list="statusTickets" 
						formIds="form_" 
						listKey='cod' listValue='descripcion'
					/> 
                </td>
				<td><sj:a id="filtrar"  href="%{car_1}"  formIds="form_" targets="reporte"  indicator="indicatorc2" button="true"  >Filtrar</sj:a></td>
             </tr>
             <tr>
              <td><center><img id="indicatorc2" src="img/pg1.gif" alt="Cargando..." style="display: none" /></center></td>
             </tr>
        </table>      
    </s:form>
    <sj:div id='reporte' >
        
    </sj:div>	
</body>
</html>